package com.yc.common.core.domain.model;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class RegisterBody {

    @NotBlank(message = "请输入用户名")
    @Size(min = 2, max = 20, message = "用户名长度在2-20个字符之间")
    private String username;

    @NotBlank(message = "请输入手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @NotBlank(message = "请输入密码")
    private String password;

    @NotBlank(message = "请确认密码")
    private String confirmPassword;

    @NotBlank(message = "请输入计算结果")
    private String code;

    @NotBlank(message = "验证码ID不能为空")
    private String captchaId;
}